package test.gateway.a.controllers;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
@Slf4j
public class CookieController {

    @GetMapping("/cookieValue")
    public String cookieValue(HttpServletRequest request){
        String token = request.getHeader("token");
        log.info("收到的 token 为 {}",token);
        return token;
    }
}
